﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Get_ReqCacheItem.aspx.cs" Inherits="oceanho.webapi.factory.Admin.Get_ReqCacheItem" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="Content/bootstrap.min.css" rel="stylesheet" />
    <link href="Content/bootstrap-theme.css" rel="stylesheet" />
    <script src="Scripts/jquery-1.7.1.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
    <style type="text/css">
        input, select {
            outline: none;
        }

        .input-medium {
            border-radius: 15px;
            padding: 3px 10px;
            border: 1px solid #ccc;
            box-shadow: #e6e7ed;
        }

            .input-medium:hover {
                -webkit-box-shadow: 0 0 10px #eee8e8;
                -moz-box-shadow: 0 0 10px #eee8e8;
                box-shadow: 0 0 10px #eee8e8;
            }

        .box-shadow-1 {
            -webkit-box-shadow: 3px 3px 3px;
            -moz-box-shadow: 3px 3px 3px;
            box-shadow: 3px 3px 3px;
        }

        .box-shadow-2 {
            -webkit-box-shadow: 0 0 10px #0CC;
            -moz-box-shadow: 0 0 10px #0CC;
            box-shadow: 0 0 10px #0CC;
        }

        .box-shadow-3 {
            -webkit-box-shadow: 0 0 10px rgba(0, 204, 204, .5);
            -moz-box-shadow: 0 0 10px rgba(0, 204, 204, .5);
            box-shadow: 0 0 10px rgba(0, 204, 204, .5);
        }

        .box-shadow-4 {
            -webkit-box-shadow: 0 0 10px 15px #0CC;
            -moz-box-shadow: 0 0 10px 15px #0CC;
            box-shadow: 0 0 10px 15px #0CC;
        }

        .box-shadow-5 {
            -webkit-box-shadow: inset 0 0 10px #0CC;
            -moz-box-shadow: inset 0 0 10px #0CC;
            box-shadow: inset 0 0 10px #0CC;
        }

        .box-shadow-6 {
            box-shadow: -10px 0 10px red, /*左边阴影*/
            10px 0 10px yellow, /*右边阴影*/
            0 -10px 10px blue, /*顶部阴影*/
            0 10px 10px green; /*底边阴影*/
        }

        .box-shadow-7 {
            box-shadow: 0 0 10px 5px black, 0 0 10px 20px red;
        }

        .box-shadow-8 {
            box-shadow: 0 0 10px 20px red, 0 0 10px 5px black;
        }

        .box-shadow-9 {
            box-shadow: 0 0 0 1px red;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            setInterval(function () {
                form1.submit();
            }, 2000);
        });
    </script>
</head>
<body>
    <form id="form1" runat="server" method="post" class="form-search form-inline">
        <div class="panel">
            <table style="width: 680px;">
                <tbody>
                    <tr>
                        <td>协议+域名:</td>
                        <td>
                            <input type="text" class="input-medium search-query" name="domain" value="<%=domain %>" placeholder="https://wwww.oceanho.com/" />
                        </td>
                        <td>客户端IP地址：</td>
                        <td>
                            <input type="text" class="input-medium" name="ipaddr" value="<%=ipaddr %>" placeholder="127.0.0.1" />
                        </td>
                        <td>
                            <input type="submit" class="btn btn-primary" value="查询" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <%if (reqCache != null)
          { 
        %>
        <div class="show"></div>
        <div class="panel">
            <table class="table table-hover" style="min-width: 1130px;">
                <thead>
                    <tr class="has-error">
                        <td>ReqID</td>
                        <td>IP</td>
                        <td>永久有效</td>
                        <td>是否黑名单</td>
                        <td>请求挂起数</td>
                        <td>总请求次数</td>
                        <td>黑名单警告等级</td>
                        <td>黑名单警告次数</td>
                        <td>允许解除IP黑名单时间</td>
                        <td>OperteDo</td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><%=reqID %></td>
                        <td><%=reqCache.IP %></td>
                        <td><%=reqCache.IsPassBadIPValid %></td>
                        <td><%=reqCache.IsBadIP %></td>
                        <td><%=reqCache.Req_Wait_Count %></td>
                        <td><%=reqCache.Req_Seconds_Count %></td>
                        <td><%=reqCache.Req_Warn_Lv %></td>
                        <td><%=reqCache.Req_Warn_Count %></td>
                        <td><%=reqCache.Req_Allow_Clear_IsBadIP_Date %></td>
                        <td>
                            <a href="Get_ReqCacheItem.aspx?cmd=del&reqID=<%=reqID %>&domain=<%=domain %>&ipaddr=<%=ipaddr %>" target="_self">删除缓存</a>
                            <a href="Get_ReqCacheItem.aspx?cmd=set2&reqID=<%=reqID %>&domain=<%=domain %>&ipaddr=<%=ipaddr %>" target="_self">永久有效</a>
                            <a href="Get_ReqCacheItem.aspx?cmd=set&reqID=<%=reqID %>&domain=<%=domain %>&ipaddr=<%=ipaddr %>" target="_self">解除黑名单</a>
                            <a href="Get_ReqCacheItem.aspx?cmd=set1&reqID=<%=reqID %>&domain=<%=domain %>&ipaddr=<%=ipaddr %>" target="_self">永久黑名单</a>                            
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <%
          } %>
    </form>
</body>
</html>
